﻿<phone:PhoneApplicationPage 
    x:Class="Groovy_IM.MessagePage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait"  Orientation="Portrait" OrientationChanged="PhoneApplicationPage_OrientationChanged"
    shell:SystemTray.IsVisible="True">

    <Grid x:Name="LayoutRoot" Background="Transparent">
        <!--Pivot Control-->
        <controls:Pivot Title="Groovy IM">
            <!--"Chat" Item One-->
            <controls:PivotItem Header="IM">
                <ListBox x:Name="imChat" Margin="0,0,-12,0">
                    <StackPanel Orientation="Horizontal" Margin="0,0,0,17">
                        <StackPanel Width="455" x:Name="imWidth">
                            <ListBox x:Name="imText" ItemsSource="{Binding Items}" Margin="0,0,0,0" MaxHeight="550">
                                <ListBox.ItemTemplate>
                                    <DataTemplate>
                                        <StackPanel>
                                            <Border Background="{Binding BackUserColor}" BorderThickness="3" Margin="0,0,0,0" Height="60" Width="455">
                                                <TextBlock Text="{Binding Username}" Foreground="White" FontSize="{StaticResource PhoneFontSizeLarge}" VerticalAlignment="Center" HorizontalAlignment="Center" />
                                            </Border>
                                            <Border Background="{Binding BackUserColor}" BorderThickness="3" Margin="0,-10,0,10" MinHeight="60" Width="455">
                                                <TextBlock Text="{Binding UserText}" Foreground="White" FontSize="{StaticResource PhoneFontSizeNormal}" VerticalAlignment="Center" HorizontalAlignment="Center" TextWrapping="Wrap" />
                                            </Border>
                                        </StackPanel>
                                    </DataTemplate>
                                </ListBox.ItemTemplate>
                            </ListBox>
                            <TextBox Margin="0,10,0,0" Visibility="Visible" x:Name="imSend" InputScope="chat" />
                        </StackPanel>
                    </StackPanel>
                </ListBox>
            </controls:PivotItem>

            <!--"Options" Item Two-->
            <controls:PivotItem Header="Options">
                
            </controls:PivotItem>
        </controls:Pivot>
    </Grid>

    <!--Sample code showing usage of ApplicationBar-->
    <!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton x:Name="appbar_button1" IconUri="/Images/appbar_button1.png" Text="Button 1"/>
            <shell:ApplicationBarIconButton x:Name="appbar_button2" IconUri="/Images/appbar_button2.png" Text="Button 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem x:Name="menuItem1" Text="MenuItem 1"/>
                <shell:ApplicationBarMenuItem x:Name="menuItem2" Text="MenuItem 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->
    
</phone:PhoneApplicationPage>